#!/bin/sh

# Overrides install.sh
check_machine_image()
{
    [ -x "/usr/bin/mb_detect" ] && {
        platform=$(/usr/bin/mb_detect -p)
    }
    image_platform_machine=$(echo $image_build_machine | sed "s/rangeley_p1330/${platform}/g")
    echo "ONIE: Platform Machine: $image_platform_machine"

    if [ "$onie_build_machine" != "$image_build_machine" ] && [ "$onie_build_machine" != "$image_platform_machine" ] ; then
        fail=yes
    fi
    if [ "$onie_machine_rev" != "$image_machine_rev" ] ; then
        fail=yes
    fi
    if [ "$onie_arch" != "$image_arch" ] ; then
        fail=yes
    fi
}

